<template>
  <div>
    <h3 ref="title">{{title}}</h3>
    <hr>
    <button @click="showTit">获取标题</button>
    <School ref="sch" a="1" b="2"></School>
  </div>
</template>

<script>
import School from "./components/School.vue";
export default {
  name:"App",
  data() {
    return {
      title:"App.vue",
      student:{id:'16403',name:'lisi',age:18}
    }
  },
  components:{
    School
  },
  methods: {
    showTit(){
      console.log(this.$refs)
      console.log(this.$refs.title)
      console.log(this.$refs.sch)
    }
  },
}
</script>